#!/bin/bash

input_dir_tra=/home/yjy/PycharmProjects/arcface-pytorch/data/Datasets/CASIA/train_SDDLM
input_dir_test=/home/yjy/PycharmProjects/arcface-pytorch/data/Datasets/CASIA/test_ALL
output_dir_tra=/home/yjy/PycharmProjects/arcface-pytorch/data/Datasets/CASIA
output_dir_test=/home/yjy/PycharmProjects/arcface-pytorch/data/Datasets/CASIA

files=`ls "$input_dir_tra"`
for filename in ${files}; do
        person_id=`expr substr "$filename" 1 4`
        echo "....................generating "$filename
        echo $filename" "$person_id >> $output_dir_tra/train.txt
done

files=`ls "$input_dir_test"`
for filename in ${files}; do
        person_id=`expr substr "$filename" 1 4`
        echo "....................generating "$filename
        echo $filename" "$person_id >> $output_dir_test/test.txt
done
